package com.hs;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * @Author: hs
 * @Description:
 * @Date: Create in 17:05 2019/7/25
 */
public class ListRemove {

    public static void main(String[] args) {
        ArrayList<String> arrayList = new ArrayList<>();

        for (int i = 0; i < 10; i++) {
            arrayList.add(String.valueOf(i));
        }
        int size = arrayList.size();
        /*for(int i = 0; i < size; i++){
            arrayList.remove(i);
        }*/

        Iterator<String> iterator = arrayList.iterator();
        while(iterator.hasNext()){
            String next = iterator.next();
            arrayList.remove(next);

        }
        System.out.println(arrayList);
    }
}
